package com.mate.cloud.auth;

import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.crypto.password.PasswordEncoder;

@Slf4j
@SpringBootTest
public class SpringBootSpringDocApplicationTests {

    @Resource
    private PasswordEncoder passwordEncoder;

    @Test
    public void encodePwd() {
        //将密码进行加密操作
        String encodePassword = passwordEncoder.encode("admin");
        log.info("=encodePwd#encodePassword:{}",encodePassword);
    }

}